import { defineConfig } from '@rsbuild/core';
import { pluginVue } from '@rsbuild/plugin-vue';
import path from 'path'

export default defineConfig({
	server: {
    headers: {
      'Cross-Origin-Opener-Policy': 'same-origin',
      'Cross-Origin-Embedder-Policy': 'require-corp'
    }
  },
	dev: {
		progressBar: true,
	},
	performance: {
		removeConsole: ['log', 'warn'],
	},
	html: {
		favicon: path.resolve(__dirname, './public/favicon.svg')
	},
	plugins: [pluginVue()],
	source: {
		// 指定入口文件
		entry: {
			index: './src/main.ts',
		},
		alias: {
			'~': './src',
		}
	},
});